/*
 * USART.h
 *
 * Created: 2012-05-10 10:13:28
 *  Author: Arni
 */


#ifndef USART_H_
#define USART_H_

#ifndef F_CPU
#error "F_CPU not defined for USART.h, define it in Toolchain->AVR/GNU C/C++ Compiler->Symbols->Defined symbols, ie.: F_CPU=1000000UL"
#endif

#define USART_BAUDRATE	9600
#define BAUD_PRESCALE	(((F_CPU / (USART_BAUDRATE * 16UL))) - 1)

void USART1_Init(void);

void USART1_Transmit(char data);

//void sendText(char *ptext);
void sendText(const char *ptext);

void sendBCD(char *p_data);
void sendBin(unsigned char data);
void sendHex(unsigned char data);

unsigned char USART1_Receive();
void getLine(char *pIn);

#endif /* USART_H_ */
